package com.iplay.dao.hotel.discount;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.repository.PagingAndSortingRepository;

import com.iplay.entity.hotel.discount.HotelDiscountDO;

public interface HotelDiscountDAO extends PagingAndSortingRepository<HotelDiscountDO, Integer>{
	
	Page<HotelDiscountDO> findByHotelIdAndDateGreaterThanEqual(int hotelId, long date, Pageable pageable);
	
	Page<HotelDiscountDO> findByHotelId(int hotelId, Pageable pageable);
	
	Page<HotelDiscountDO> findByHotelIdAndDateGreaterThanEqualAndDateLessThanEqual(int hotelId, long start, long end, Pageable pageable);

	HotelDiscountDO findByHotelIdAndDate(int hotelId, long date);
}
